//
//  TextViewButtonView.m
//  UserCenter
//
//  Created by lanou3g on 16/3/9.
//  Copyright © 2016年 GKZYAid. All rights reserved.
//

#import "TextViewButtonView.h"

@implementation TextViewButtonView

- (id)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self addAllViews];
    }
    return self;
}

- (void)addAllViews
{
    self.backgroundColor = [UIColor lightGrayColor];
    
    self.textViewInput = [[UITextView alloc] initWithFrame:CGRectMake(self.frame.size.width * 0.05, self.frame.size.height * 0.1, self.frame.size.width * 0.65, self.frame.size.height * 0.8)];
    self.textViewInput.font = [UIFont systemFontOfSize:17.0f];
    [self addSubview:self.textViewInput];
    
    self.buttonComment = [UIButton buttonWithType:(UIButtonTypeCustom)];
    self.buttonComment.frame = CGRectMake(CGRectGetMaxX(self.textViewInput.frame) + self.frame.size.width * 0.05, self.textViewInput.frame.origin.y, self.frame.size.width * 0.2, self.textViewInput.frame.size.height);
    self.buttonComment.backgroundColor = [UIColor orangeColor];
    [self addSubview:self.buttonComment];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
